Parse RFC 9651-like date headers - #37224
Conversation
|
RFC 9651 ships way more than that. Is there a particular need to support this feature in a standalone fashion? |
@bclozel true, but My use-case is that I want to alert if the API we consume is deprecated. I want to increase the alert severity depending on how far in the future the deprecation is scheduled for, which is why I need to parse the date in the Some of the API I consume uses the draft version of the |
RFC 9651 specifies @«timestamp» as a new format for date headers. The Deprecation header as specified in RFC 9745, for example, makes use of it. Make sure this can be parsed using `HttpHeaders#getFirstDate` and `HttpHeaders#getFirstZonedDateTime` Signed-off-by: Raphael Schweikert <any@sabberworm.com>
a76e967 to
130b0ec
Compare
|
Thanks @sabberworm - with this change, we're not committing to RFC 9651 (because there is a lot to unpack there), but the use case makes sense. |
RFC 9651 specifies @«timestamp» as a new format for date headers. The Deprecation header as specified in RFC 9745, for example, makes use of it. Make sure this can be parsed using
HttpHeaders#getFirstDateandHttpHeaders#getFirstZonedDateTime.